Method of printing web page by using mobile terminal and mobile terminal for performing the method

ABSTRACT

A method of printing a web page by using a mobile terminal and a mobile terminal are provided. The method includes displaying a web page on the mobile terminal, receiving a request for printing the web page via a mobile printing application, generating a preview image by extracting one or more objects from the web page and setting a layout, determining the one or more objects to be printed and a layout of the one or more objects in the preview image, and generating printing data according to the determined one or more objects and the layout.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is related to, and claims the priority benefit of U.S. Provisional Patent Application No. 61/834,150, filed on Jun. 12, 2013, in the U.S. Patent and Trademark Office, and Korean Patent Application No. 10-2013-0083584, filed on Jul. 16, 2013, in the Korean Intellectual Property Office, the disclosures of which are incorporated herein in their entirety.

BACKGROUND

1. Field

One or more embodiments relate to a method of printing a web page by using a mobile terminal, and a mobile terminal.

2. Description of the Related Art

Recently, mobile terminals such as smartphones or tablet PCs have been widely used, and Internet searching has been also performed by using the mobile terminals. In some cases, current web page displayed on the smartphone may need to be printed. Printing data may be generated by using a mobile printing application installed in the smartphone, and the printing data may be transferred wirelessly to a printer to perform a direct printing operation.

When generating the printing data by using the mobile printing application, the currently displayed web page screen may be converted into a bitmap image by using a web view component provided by an operating system (OS) thereof to generate the printing data. However, problems may exist with the same.

Printing quality may be low. Since a Web view screen may be captured as it is or converted into a bitmap image, the bitmap image may be generated with a resolution that is suitable for a smartphone screen, and accordingly, the printing quality of the bitmap image may be degraded. The Web view may have to be expanded and captured a plurality of times in order to print the web view of high quality, and thus, it may require a lot of time for printing. In addition, in some OS, the method may not be performed, and thus, the printing may be performed in low quality.

A rendering efficiency may be degraded. When performing a rendering operation, images are captured from the web view and recombined to configure a printing image per page, and, the printing data is generated. Thus, it may require a lot of time for performing the rendering operation, and storage space in a memory may not be sufficient.

Also, changing a layout may be difficult. Since the web page may be captured and extracted as the bitmap image, if a user changes printing options and a layout may be changed, the entire web page has to be recombined. Thus, operation processes may be complicated and require a lot of time for performing the operation.

In addition, the printing method may be highly dependent upon a kind of OS. If the web view does not support the image extraction according to the kind of OS, it may be difficult to use the web page printing function in the smartphone. Since manipulation method of the web view component varies depending on the OS, a coding operation may need to be performed again according to each OS.

SUMMARY

One or more embodiments include a method of printing web page displayed on a mobile terminal, capable of performing a printing operation of high quality and high efficiency, easily setting and changing a layout, and forming a common module between different kinds of platforms.

Additional aspects will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the embodiments.

According to one or more embodiments, a method of printing a web page by using a mobile terminal includes displaying a web page on the mobile terminal, receiving a request for printing the web page via a mobile printing application, generating a preview image by extracting one or more objects from the web page and setting a layout, determining the one or more objects to be printed and a layout of the one or more objects in the preview image, and generating printing data according to a determined one or more objects and the layout.

The generating of the preview image may include extracting objects to be printed from among the objects included in the web page, and setting a layout of the extracted objects automatically.

According to one or more embodiments, a mobile terminal includes, a user interface to receive a user input; a communication unit to receive a web page, a display unit to display the web page and a preview image of the web page, a printing data generator to generate printing data about the web page, and a control unit, wherein the control unit generates the preview image managing items in the web page as objects, and controls the printing data generator to generate the printing data when objects to be printed and a layout of the objects are determined on the preview image.

The printing data generator may include an object extractor to extract objects to be printed from the web page displayed on the display unit, a layout setting unit to set a layout of the objects; and a rendering unit to perform a rendering operation according to the layout to generate the printing data.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:

FIG. 1 illustrates an environment for implementing a method of printing a web page by using a mobile terminal, according to an embodiment;

FIG. 2 illustrates a screen of web page sources by analyzing a Web page according to a method of printing a web page by using a mobile terminal according to an embodiment;

FIGS. 3A and 3B illustrate a screen of selecting an object to be printed in a method of printing a web page by using a mobile terminal according to an embodiment;

FIG. 4 illustrates a screen of changing a location of the object according to the method of printing the web page by using the mobile terminal of the embodiment;

FIGS. 5A and 5B illustrate screens of changing layout of objects according to an orientation change of the mobile terminal in the method of printing the Web page by using the mobile terminal, according to the embodiment;

FIG. 6 illustrates a screen of selecting an object to be printed in the method of printing the web page by using the mobile terminal according to an embodiment;

FIG. 7 illustrates a screen of performing an object-based rendering operation in the method of printing the web page by using the mobile terminal, according to an embodiment;

FIG. 8 is a block diagram of a mobile terminal according to an embodiment;

FIG. 9 is a block diagram of an image forming apparatus according to an embodiment;

FIG. 10 is a flowchart illustrating a method of printing a web page by using a mobile terminal according to an embodiment;

FIG. 11 is a flowchart illustrating processes of extracting an object in a method of printing a web page by using a mobile terminal according to an embodiment;

FIGS. 12 through 14 are flowcharts illustrating processes of setting layouts of objects in the method of printing a web page by using a mobile terminal according to an embodiment;

FIGS. 15 and 16 are flowcharts illustrating processes of rendering objects in a method of printing the web page by using a mobile terminal according to an embodiment;

FIGS. 17 through 19 are flowcharts illustrating a method of printing a Web page by using a mobile terminal, according to an embodiment; and

FIG. 20 is a flowchart illustrating processes of printing data transmitted from an image forming apparatus in the method of printing a web page by using the mobile terminal according to the embodiment.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. In this regard, the embodiments may have different forms and should not be construed as being limited to the descriptions set forth herein. Accordingly, the embodiments are merely described below, by referring to the figures, to explain aspects of the present description.

FIG. 1 illustrates an environment of implementing a method of printing a web page by using a mobile terminal 100 according to an embodiment. To execute a method of printing the web page by using the mobile terminal 100, a mobile terminal 100 displaying a web page and generating printing data of the web page, and a multi-functional peripheral (MFP) 200 receiving the printing data from the mobile terminal 100 and performing a printing operation may be used. A method of printing a web page by using a mobile terminal according to an embodiment is described.

The method of printing the web page by using the mobile terminal according to an embodiment includes extracting objects from a Web page, setting a layout of extracted objects, generating printing data by rendering the objects according to the set layout, and parsing the printing data to perform a printing operation. Processes are described with reference to FIGS. 2 through 7. Exemplary screens illustrated in FIGS. 2 through 7 are preview images of the Web page to be printed.

FIGS. 2 through 3B are diagrams relating to the operation of extracting objects from a web page.

FIG. 2 illustrates a screen of obtaining web page sources by analyzing a web page 210. The Web page 210 may be generally configured by hypertext mark-up language (HTML) or Java-script, and web page source 220 may be obtained by analyzing the web page 210. The web page source 220 includes attribute-values 221, 222, and 223 corresponding respectively to objects 211, 212, and 213 included in the web page 210, and values about relative locations between the objects. An attribute-value of an object is a value including information, for example, about a style, a size, a color, and/or an interval of the object. By extracting the attribute-values 221, 222, and 223 and the value about the relative locations between the object from the web page source 220, elements included in the web page 210 may be managed as objects.

Configurations of the web page source 220, which are not displayed on the web page 210, for example, sound, events, background logic, and the like) may be removed, and the attribute-values only about an image object 211, a text object 212, and a table object 213 that are displayed on the web page 210 may be extracted to simplify the web page source 220.

After extracting the objects 211, 212, and 213 displayed on the web page 210, objects to be printed may be extracted, except for some of the objects, according to a user's selection.

FIGS. 3A and 3B illustrate screens of selecting the objects to be printed according to a method of printing a web page by using a mobile terminal of an embodiment. A mobile printing application may provide a preview image including some or all the objects included in the web page, and provide a screen through which the user may directly select the objects to be printed. FIGS. 3A and 3B illustrate examples of such a screen.

As illustrated in FIG. 3A, a region may be set in order to select objects to be printed from among objects 311, 312, and 313 on a web page 310. The objects 311 and 312 located in a selected region 10 may be selected as the objects to be printed and extracted. The object 313 located out of the selected region 10 is not printed and may be deleted.

A size of the selected region 10 may be set by moving two setting points 11 and 12 located at corners of the selected region 10, or a location of the selected region 10 itself may be moved. For example, in a case where the Web page 310 is displayed on a touch screen, the user may touch a setting point, e.g., the two setting points 11 and 12 with two fingers and move the fingers to move the setting points 11 and 12. The setting region 10 having the setting points 11 and 12 that are moved as corners may be newly set. When the user may touch a finger on an arbitrary point in the selected region 10 and move the finger while contacting the touch screen, the entire selected region 10 may be moved along the finger.

When the objects to be printed are selected by setting the selected region 10, the plurality of objects may be easily selected.

As illustrated in FIG. 3B, objects 321, 322, and 323 displayed on the web page 320 may have check boxes 321 a, 322 a, and 323 a, respectively. The screen showing the check boxes 321 a, 322 a, and 323 a may be displayed, for example, outlined or highlighted, where the user may select objects to be displayed. For example, when the user touches one of the objects 321, 322, and 323 for a predetermined time period or longer, the check boxes 321 a, 322 a, and 323 a are displayed to wait for a selection input of the user. A selection may be realized in various ways.

The user may select the object by touching the check box on the object to be printed. In FIG. 3B, the check box 321 a on the image object 321 and the check box 322 a on the text object 322 are checked, and thus, the image object 321 and the text object 322 are selected as the objects to be printed. Therefore, the image object 321 and the text object 322 are extracted, and a table object 323 is deleted.

When the objects to be printed are extracted, a layout of the extracted objects may be set. FIGS. 4 through 5B illustrate a setting of the layout of the extracted objects.

When the user sets printing options, the layout of the objects may be set automatically according to the set printing options. For example, when the user sets the printing options such as a size of a printing paper and a printing direction, sizes of the objects are increased or reduced according to the set printing option, and locations of the objects are determined. Such an automatic layout setting function may be turned on or turned off by the user in a set menu of a mobile printing application.

After setting the layout automatically, if there is an input of changing the layout setting from the user, the layout of the objects is changed. The user may direct the change in the layout setting in various ways. Hereinafter, a method of changing a location of an object directly by using a touch operation and a method of changing a direction of the mobile terminal on which the web page is displayed will be described with reference to FIGS. 4 through 5B below.

FIG. 4 illustrates a screen of changing a location of an object in a method of printing a web page by using a mobile terminal according to an embodiment. As illustrated in FIG. 4, an image object 411 and a table object 413 are on a web page 410, e.g., at a left side of web page 410. When the user touches an arbitrary point on the image object 411 and moves a finger in a direction denoted by an arrow 417 while contacting the screen, the image object 411 may be moved along with the finger, as illustrated in a web page 420, to at a right side of web page 420. The table object 413 may be easily moved in a similar manner.

FIGS. 5A and 5B illustrate screens and a changing of the layout of the objects according to a change in orientation, for example, of a mobile terminal in a method of printing a web page by using the mobile terminal according to an embodiment.

As illustrated in FIG. 5A, a web page 510 displays a layout setting of objects 511 and 512 when the mobile terminal is placed in a longitudinal direction. When the mobile terminal is placed in the longitudinal direction, a longitudinal length of the web page 510 is greater than a transverse width of the web page 510, and thus, the image object 511 and the text object 512 are located above and below each other. In this state, when the direction in which the mobile terminal is placed is changed to a transverse direction, the layout of the objects 511 and 512 is changed as illustrated in a web page 520. In a state where the mobile terminal is placed in the transverse direction, since the transverse width of the web page 520 is greater than the longitudinal length of the web page 520, the image object 511 and the text object 512 are arranged on left and right sides of the web page 520.

The objects that may be displayed in one web page may be displayed on two or more separate web pages due to the orientation change of the mobile terminal as illustrated in FIG. 5B. As illustrated in FIG. 5B, an image object 531, a text object 532, and a table object 533 are displayed on one web page 530 in a state where the mobile terminal is placed in a longitudinal direction. However, when the direction in which the mobile terminal is placed is changed to the transverse direction, the objects 531, 532, and 533 are separately displayed on two web pages 540 and 550. The web pages 540 and 550 may or may not be displayed on the screen of the mobile terminal at once. For example, only one web page may be displayed, and another web page may be displayed when a touch input such as a flicking of the screen of the mobile terminal is input.

It may be determined whether the mobile terminal is placed in the longitudinal direction or the transverse direction by using, for example, a gyro sensor provided in the mobile terminal. When the user holds the mobile terminal longitudinally or transversely, an orientation of the mobile terminal may be determined by detecting a sensing value of a gyro sensor in the mobile terminal, and the layout of the objects may be automatically changed according to the determined orientation. Therefore, the user may change the printing type and the layout of the objects easily by changing the orientation of the mobile terminal.

FIG. 6 illustrates a screen of selecting an object to be printed in a method of printing a web page by using a mobile terminal, according to an embodiment. As illustrated in FIGS. 3A and 3B, the user may directly select the object to be printed, however, the object to be printed may be selected automatically even when the user may not select the object directly. In FIG. 6, a web page 610 is a screen showing a certain article on a portal site. The web page 610 includes a content portion 611 of the article and a portion 612 including, for example, ads and image links. According to an embodiment, only the content portion 611 of the article may be desired to be printed, and thus, when there is a request for printing, objects included in the content portion 611 of the article may be extracted and expanded to provide a preview image, as illustrated in a web page 620 at a right side of FIG. 6.

The objects to be printed may be automatically selected and extracted according to a characteristic of the web page, and thus, inconvenience of selecting the objects may be reduced.

When the layout setting of the objects is finished, a rendering operation may be performed to generate printing data. There are multiple ways of rendering the objects that are extracted according to the set layout, one of which is a rendering performed based on objects and another of which is a method of generating bitmap image data.

According to a method of performing the rendering operation based on the objects, attribute-values of the extracted objects and values about relative locations between the objects are mapped to a command corresponding to a format of the printing data that is to be generated and converted into the printing data, as illustrated in FIG. 2. For example, if the objects are rendered as a printer control language (PCL) file or a portable document format (PDF) file, the extracted objects are mapped as PCL and PDF command and converted. A rendering may be performed in an XML paper specification (XPS) or a post script (PS) format file.

FIG. 7 illustrates a screen in performing an object-based rendering operation in the method of printing the web page by using the mobile terminal according to the embodiment. Objects 711, 712, and 713 displayed on a web page 710 at a left side of FIG. 7 may be mapped as corresponding commands as illustrated in a web page 720 at a right side of FIG. 7. That is, an image object 711 is mapped as bitmap data 721, and a text object 712 and a table object 713 are mapped respectively as a text command 722 and a table command 723.

According to the method of generating the bitmap data, the objects are arranged after being expanded or reduced according to the set layout, and the bitmap images are generated according to pixel values.

The printing data generated may be transferred to a multi-function peripheral (MFP). The MFP performs a printing operation by parsing the printing data. Processes of printing the printing data by the MFP will be described below with reference to FIG. 9.

Configurations of the mobile terminal and the MFP for performing the method of printing the web page are described. FIG. 8 is a block diagram of a mobile terminal 100 according to an embodiment, and FIG. 9 is a block diagram of an MFP 200 according to an embodiment.

As illustrated in FIG. 8, the mobile terminal 100 according to an embodiment includes a communication unit 110, a control unit 120, a printing data generator 130, a user interface 140, and a display unit 150. The printing data generator 130 may include an object extractor 131, a layout setting unit 132, and a rendering unit 133.

The communication unit 110 is a component for performing wired/wireless communication. The mobile terminal 100 may access the Internet via the communication unit 110 to receive web pages, and may transmit the printing data to the MFP via the communication unit 110.

The control unit 120 controls an execution of a mobile printing application installed in the mobile terminal 100, and controls other components, for example, all the other components included in the mobile terminal 100. The control unit 120 may control the display unit 150 to display the web page received via the communication unit 110, and may control the printing data generator 130 to generate printing data of the web page displayed on the display unit 150. The control unit 120 controls operations of the mobile terminal in response to a user input received through the user interface 140. For example, when receiving a printing option setting input from the user, the control unit 120 sets the printing option, and when receiving a printing command, the control unit 120 makes the printing data generate and transferred to the MFP. The control unit 120 may include a micro processor.

The user interface 140 receives various inputs from the user, and the display unit 150 displays the images. In an embodiment, the user interface 140 and the display unit 150 are separate elements; however, the user interface 140 and the display unit 150 may be configured as one element. For example, a touch screen that may display the image and receive various inputs from the user may be both the user interface 140 and the display unit 150.

The printing data generator 130 generates the printing data for printing the web page displayed on the display unit 150. The printing data generator 130 generates the printing data of high quality and with high efficiency by managing the features of the web page as objects, and it is easy to change the layout of the objects and to form a common module between two different kinds of platforms.

Detailed operations of the components included in the printing data generator 130 are described. The object extractor 131 extracts the objects to be printed from the web page. The web page formed as HTML or Java-script may be analyzed to obtain web page sources, and attribute-values of the objects and values about relative locations between the objects are extracted from the web page sources. Items that are not displayed on the web page from among the items included in the web page sources (for example, sound, events, background logic, and the like) may be deleted, attribute-values of the objects that are displayed, for example, only the objects that displayed on the web page, that is, an image object, a text object, and a table object, may be extracted.

The objects to be printed may be selected by the user or automatically according to the characteristic of the web page from among the objects displayed on the web page, for example, as described above with reference to FIGS. 3A, 3B, and 6.

The layout setting unit 132 sets the layout of the objects extracted by the object extractor 131. When the user sets the printing options, the layout setting unit 132 may set the layout of the objects automatically according to the printing options. For example, when the user sets printing options such as a size of the printing medium and a printing direction, the layout setting unit 132 may expand or reduce the sizes of the objects, and determine the locations of the objects.

When receiving a user input for changing the layout setting through the user interface 140 after setting the layout automatically, the layout setting unit 132 changes the layout of the objects. A method of changing the layout according to the user input is described above, for example, with reference to FIGS. 4 through 5B.

The rendering unit 133 performs the rendering operation according to the layout set by the layout setting unit 132 for finally forming the printing data. There are multiple ways of rendering the objects according to the layout, one of which is a method of performing the rendering operation based on the objects and another of which is a method of generating bitmap image data.

According to a method of performing the object-based rendering operation, the rendering unit 133 maps the attribute-values of the objects extracted from the web page sources and the values about the relative locations between the objects as the command corresponding to a format of the printing data that is to be generated. For example, the rendering unit 133 may generate printing data of PCL format by mapping and converting the extracted objects to the PCL command, and similarly, may generate printing data of the PDF, XPS, or PS format.

According to a method of generating the bitmap image data, the rendering unit 133 arranges the objects by expanding or reducing the objects according to the layout, and generates the bitmap image by reading the pixel values of the objects.

As illustrated in FIG. 9, the MFP 200 according to an embodiment may include a communication unit 210, a control unit 220, a printing data processing unit 230, and a print engine 240. The printing data processing unit 230 may include a header analyzing unit 231, and emulators 232 through 235 corresponding to a plurality of file formats.

The communication unit 210 is a component for wirelessly communicating with the mobile terminal 100. The MFP 200 may receive printing data for printing the web page from the mobile terminal 100 via the communication unit 210.

The control unit 220 controls operations of items in the MFP 200. When the communication unit 210 receives the printing data, the control unit 220 controls the MFP 200 to transfer the printing data to the printing data processing unit 230 for performing a parsing operation and to print the parsed printing data by the print engine 240. The control unit 220 may include a micro processor.

The printing data processing unit 230 processes the printing data transmitted from the mobile terminal 100. The header analyzing unit 231 analyzes a header of the received printing data to determine a file format of the printing data, and sends the printing data to an emulator corresponding to the determined file format. That is, when it is determined that the file format of the printing data is a PDF format, the header analyzing unit 231 transfers the printing data to a PDF emulator 232, and transfers the printing data to the corresponding emulator.

The emulator corresponding to each file format converts the printing data into a bitmap image, and transfers the bitmap image to the print engine 240. In FIG. 9, the emulators 232 through 235 include the PDF emulator 232, a PCL emulator 233, an XPS emulator 234, and a PS emulator 235, however, additional emulators corresponding to additional file formats may be further provided, if necessary.

FIGS. 10 through 20 are flowcharts illustrating a method of printing a web page by using a mobile terminal according to an embodiment. A method of printing the web page by using the mobile terminal is described with reference to FIGS. 10 through 20.

FIG. 10 is a flowchart illustrating a method of printing the web page by using the mobile terminal according to an embodiment. As illustrated in FIG. 10, objects to be printed are extracted from a web page in operation S1100. When the objects to be printed are extracted, a layout of the extracted objects is set in operation S1200. The extracted objects are rendered according to the layout to generate printing data in operation S1300. A preview image in which the objects extracted in operation S1100 are arranged according to the layout set in the operation S1200 may be generated and provided to the user. Selection of the objects to be printed or an input of changing the layout may be received through the preview image.

The processes of extracting the objects, setting the layout, and rendering the objects are described in detail with reference to FIGS. 11 through 16.

FIG. 11 is a flowchart illustrating processes of extracting the objects, according to the embodiment. That is, FIG. 11 illustrates processes included in the operation S1100 in detail.

As illustrated in FIG. 11, the web page configured as the HTML or the Java-script is analyzed to obtain web page sources in operation S1101. The web page sources include attribute-values of the objects, which correspond to the objects included in the web page, and values about relative locations between the objects. The attribute-value of the object includes information about a style, a size, a color, and an interval of the object.

Items that are not displayed on the web page (for example, sound, events, background logic, and the like) from among items included in the web page sources are deleted in operation S1102. Attribute-values and values about relative locations between the remaining objects, that is, the objects displayed on the web page, are extracted in operation S1103.

Objects to be printed are selected by the user or according to characteristics of the web page in operation S1104, and the attribute-values of the objects that are not selected are deleted.

FIGS. 12 through 14 are flowcharts illustrating processes of setting the layout of the objects in the method of printing the web page by using the mobile terminal, according to the embodiment. FIGS. 12 through 14 are flowcharts illustrating processes included in the operation S1200 of FIG. 10.

As illustrated in FIG. 12, printing options are set according to user's input in operation S1211. After setting the printing operations, sizes of the objects are expanded or reduced according to the printing options in operation S1212. For example, the sizes of the objects may be expanded or reduced according to a size of a selected printing medium. The sizes of the objects may be expanded or reduced by changing the attribute-values of the objects.

When the sizes of the objects are determined in operation S1212, locations of the objects are determined according to the printing options in operation S1213. The locations of the objects may be changed by changing the values about the relative locations between the objects.

In FIG. 12, the locations of the objects are determined after expanding or reducing the sizes of the objects, however, the above order may be changed or the two processes may be performed at the same time.

As illustrated in FIG. 13, a sensing value of a gyro senor provided in the mobile terminal is detected in operation S1221, and an orientation of the mobile terminal is identified from the sensing value in operation S1222. That is, it may be determined whether the mobile terminal is placed in a longitudinal direction or in a transverse direction. After identifying the orientation of the mobile terminal, the locations of the objects are determined according to the orientation direction of the mobile terminal in operation S1223. Therefore, the user may set the printing direction and may change the layout of the objects simply by changing the direction of the mobile terminal.

As illustrated in FIG. 14, the extracted objects are displayed on a preview image of the web page in operation S1231. In operation S1232, an input of setting the layout of the objects is received from the user. For example, the user may change the location of the object by moving his/her finger while contacting the object displayed on the preview image. When receiving the user input, the layout of the objects is set according to the user input in operation S1233. Therefore, the user may freely change the locations of the objects.

FIGS. 15 and 16 are flowcharts illustrating processes of rendering the objects in the method of printing the web page by using the mobile terminal according to the embodiment. FIGS. 15 and 16 are flowcharts illustrating processes included in operation S1300 of FIG. 10.

FIG. 15 is a flowchart illustrating processes of performing an object-based rendering operation, and in particular, processes of generating printing data of PDF format. As illustrated in FIG. 15, the attribute-values of the objects and the values about the relative locations between the objects are changed according to the layout in operation S1311. Then, the attribute-values of the objects and the values about the relative locations are mapped to a PDF command and converted in operation S1312. In operation S1313, printing data including the converted PDF command is generated.

FIG. 16 is a flowchart illustrating a rendering method for generating a bitmap image. As illustrated in FIG. 16, the objects are arranged after being expanded or reduced according to the layout in operation S1321, and pixel values of the objects are read to generate a bitmap image in operation S1322.

FIGS. 17 through 19 are flowcharts illustrating a method of printing a web page by using a mobile terminal according to an embodiment.

As illustrated in FIG. 17, objects that are to be printed are extracted from a web page in operation S1701. It is determined whether a layout automatic setting mode is turned on in operation S1702. If the layout automatic setting mode is turned on, a layout of the extracted objects is set automatically according to printing options in operation S1703. However, if the layout automatic setting mode is turned off, a layout of the extracted objects is set according to a user input in operation S1704.

The extracted objects are rendered according to the layout to generate printing data in operation S1705, and the generated printing data is transferred to an MFP so that the MFP may print the printing data in operation S1706.

As illustrated in FIG. 18, objects that are to be printed are extracted from a web page in operation S1801. A layout of the extracted objects is automatically set by printing options in operation S1802. The printing options may be set by user input. In operation S1803, it is determined whether there is a user input for changing the layout. If there is the user input for changing the layout, the layout of the extracted objects is changed according to the user input in operation S1804. If there is no user input for changing the layout, the process goes to operation S1805.

In operation S1805, the extracted objects are rendered according to the layout to generate printing data. In operation S1806, the printing data is transferred to an MFP, and the MFP prints the printing data.

As illustrated in FIG. 19, objects that are to be printed are extracted from a web page in operation S1910. In operation S1920, a layout of the extracted objects is set. In addition, in operation S1930, the extracted objects are rendered according to the layout to generate printing data.

When the printing data is generated, the mobile terminal transfers the printing data to an MFP in operation S1940. The MFP receives the printing data and prints the printing data in operation S1950. Detailed processes of operation S1950 for printing the printing data are illustrated in a flowchart of FIG. 20.

FIG. 20 is a flowchart illustrating processes of printing the printing data by the MFP in the method of printing the web page by using the mobile terminal according to the embodiment. As illustrated in FIG. 20, in operation S1951, a header of the printing data transferred from the mobile terminal is analyzed. In operation S1952, a file format of the printing data is determined according to a result of analyzing the header. In operation S1953, the printing data is converted into a bitmap image by using an emulator corresponding to the file format determined in operation S1952. To do this, the MFP includes emulators corresponding to formats such as PCL, PDF, XPS, and PS. In operation S1954, the MFP prints the bitmap image.

According to the one or more of the above embodiments, the objects to be printed are extracted from the web page displayed on the mobile terminal and printed, and accordingly, vector graphics, texts, and the like included in the web page may be printed with high quality. A time for generating the printing data may be reduced, and a limitation in hardware specifications for performing the printing operation may be lowered, thereby providing excellent printing performance.

Moreover, the user may freely change the layout of the web page to perform the printing operation with optimal layout, and even when the printing options are changed, the layout may be automatically changed according to the printing options.

The method may be formed as a common module that may be used in different kinds of platforms, and thus, a time for developing a printing program for each operating system (OS) of the mobile terminal may be reduced.

It should be understood that the exemplary embodiments described therein should be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects within each embodiment should typically be considered as available for other similar features or aspects in other embodiments.

While one or more embodiments have been described with reference to the figures, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope as defined by the claims. 

1-21. (canceled)
 22. A method of printing a web page by using a mobile terminal, the method comprising: displaying a web page on the mobile terminal; receiving a request for printing the web page via a mobile printing application; generating a preview image by extracting one or more objects from the web page and setting a layout; determining the one or more objects to be printed and a layout of the one or more objects in the preview image; and generating printing data according to the determined one or more objects and the layout.
 23. The method of claim 22, wherein the generating of the preview image comprises: extracting objects to be printed from among the objects included in the web page; and setting a layout of the extracted objects automatically.
 24. The method of claim 23, wherein the extracting of the objects comprises extracting the objects that are to be printed according to characteristics of the web page.
 25. The method of claim 23, wherein the setting of the layout comprises: providing a screen for receiving a user input about setting of printing options; and setting sizes and locations of the objects according to the printing options set based on the user input received through the screen.
 26. The method of claim 23, wherein the setting of the layout comprises setting sizes and locations of the extracted objects according to an orientation of the mobile terminal.
 27. The method of claim 22, wherein the determining of the objects to be printed comprises: providing a screen for receiving a user's selection on some or all the objects displayed on the preview image; receiving the user's selection on the objects through the screen; and determining the selected objects as the objects to be printed.
 28. The method of claim 22, wherein the determining of the objects comprises: providing a screen for receiving a user input for changing the layout; and changing the sizes and the locations of the objects according to the user input received through the screen.
 29. The method of claim 22, wherein the generating of the printing data comprises: providing a screen for a user input for selecting a rendering method and a format of printing data; and generating the printing data by performing a rendering operation according to the user input received through the screen.
 30. A non-transitory computer-readable recording medium having embodied thereon a program for executing a method comprising: displaying a web page on a mobile terminal; receiving a request for printing the web page via a mobile printing application; generating a preview image by extracting one or more objects from the web page and setting a layout; determining the one or more objects to be printed and a layout of the one or more objects in the preview image; and generating printing data according to the determined one or more objects and the layout.
 31. A mobile terminal comprising: a user interface to receive a user input; a communication unit to receive a web page; a display unit to display the web page and a preview image of the web page; a printing data generator to generate printing data about the web page; and a control unit, wherein the control unit generates the preview image managing items in the web page as objects, and controls the printing data generator to generate the printing data when objects to be printed and a layout of the objects are determined on the preview image.
 32. The mobile terminal of claim 31, wherein the printing data generator comprises: an object extractor to extract objects to be printed from the web page displayed on the display unit; a layout setting unit to set a layout of the objects; and a rendering unit to perform a rendering operation according to the layout to generate the printing data.
 33. The mobile terminal of claim 32, wherein the control unit generates the preview image according to the extracted objects and the layout of the objects and displays the preview image on the display unit.
 34. The mobile terminal of claim 33, wherein the control unit provides a user with a screen for receiving a user's selection on some or all the objects in the preview image through the display unit, and controls the objects extractor to extract the objects selected by the user as the objects to be printed.
 35. The mobile terminal of claim 33, wherein the control unit provides a user with a screen for changing the layout displayed in the preview image through the display unit, and controls the layout setting unit to change the layout according to a user input received through the screen.
 36. The mobile terminal of claim 33, wherein the control unit provides a user with a screen for receiving a user input for selecting the rendering method and the format of the printing data through the display unit, and controls the rendering unit to perform the rendering operation according to the rendering method and the format of the printing data selected by the user through the screen.
 37. The mobile terminal of claim 32, wherein the object extractor extracts some or all of the objects visible on a screen of the mobile terminal, except for invisible objects on the screen, from among the objects included in the web page displayed on the display unit.
 38. The mobile terminal of claim 32, wherein the object extractor extracts the objects to be printed according to characteristics of the web page.
 39. The mobile terminal of claim 32, wherein the layout setting unit identifies the printing options, and determines the sizes and locations of the objects according to the printing options.
 40. A method of printing comprising: receiving a request for printing a page via a printing application; generating a preview image by extracting one or more objects from the page and setting a layout; determining the one or more objects to be printed and a layout of the one or more objects in the preview image; and generating printing data according to the determined one or more objects and the layout. 